home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows5 / zgrwin.zip / ZGRAFWIN.DOC < prev    next >
Text File  |  1992-03-01  |  73KB  |  2,073 lines

  1.  
  2.     
  3.     
  4.     It was our infirmities that he bore, our sufferings that he endured 
  5.     (Is. 53, 4).
  6.  
  7.  
  8. ------------------------------------------------------------------------------
  9.                 CONTENTS
  10. ------------------------------------------------------------------------------
  11.  
  12.         
  13.         
  14.         
  15.  
  16.      I.  ZGRAFWIN -- AN INTRODUCTION
  17.  
  18.  
  19.      II.  SETTING UP
  20.  
  21.  
  22.      III.  COMMAND-LINE SWITCH OPTIONS
  23.  
  24.  
  25.      IV.  CONSTRUCTING GRAPHS
  26.  
  27.      A.  F-2D Graph
  28.      B.  G-3D Graph
  29.      C.  X/Y Line Graph
  30.      D.  Polar Graph
  31.      E.  Log Graph
  32.      F.  Bar Graph
  33.      G.  Pie Graph
  34.      H.  Area Graph
  35.  
  36.  
  37.      V.  PRINTING GRAPHS
  38.  
  39.  
  40.      VI.  MISCELLANEOUS
  41.  
  42.      A.  Math Functions and Syntax 
  43.      B.  Saving/Restoring Graphics Images
  44.      C.  Data-File Input Formats      
  45.      D.  The Editor
  46.      E.  Adding Custom Text to Graphs
  47.      
  48.  
  49.      VII.  FILES INCLUDED ON DISK
  50.  
  51.  
  52.      VIII.  REGISTRATION
  53.  
  54.     
  55.     
  56.     
  57.     
  58.  
  59.  
  60.         
  61.         
  62.         
  63.         
  64.         
  65.         
  66. -------------------------------------------------------------------------------
  67.  
  68.                 
  69.  
  70.     I.  ZGRAFWIN -- AN INTRODUCTION
  71.  
  72.     This program is designed to allow the user to create, display,  and 
  73.     print X/Y, Polar, Log, Bar, Pie, and Area graphs, as well as graphs 
  74.     of  2-D  functions/expressions  [Y  = F(X), or F(X,Y) = 0], and 3-D 
  75.     functions [Z = G(X, Y)] in the MS-Windows 3.0 environment.  
  76.     
  77.     The program implements a "quick-and-dirty" approach; it may lack  a 
  78.     few  of  the fancy features that other professional packages offer, 
  79.     but it does allow the user to create, display, and print  a  number 
  80.     of  popular  graph  styles  within  Windows.   It  also  allows the 
  81.     importing and exporting of graphics images in color PCX format.  If 
  82.     you  are  familiar  with  the DOS ZGRAF program, you will find this 
  83.     program very similar in operation, and will probably  not  need  to 
  84.     read this document, other than just to get started....
  85.      
  86.     ZGRAFWIN  is a shareware program.  You are encouraged to try it out 
  87.     and pass it around to your friends.   If  you  decide  to  use  it, 
  88.     please  consider registering the software.  The registration fee is 
  89.     just $15. 
  90.                                
  91.     Requirements for ZGRAFWIN are:  MS-Windows ver. 3.0  or  later.   A 
  92.     color VGA monitor and a mouse are strongly recommended.
  93.                             
  94.  
  95.                  
  96.     II.  SETTING UP
  97.  
  98.     To start the program, run "ZGRAFWIN.EXE" from the  Windows  Program 
  99.     Manager.
  100.             
  101.         
  102.  
  103.    III.  COMMAND-LINE SWITCH OPTIONS
  104.  
  105.     None.              
  106.     
  107.         
  108.              
  109.     IV.  CONSTRUCTING GRAPHS
  110.     
  111.     Instead  of  giving detailed directions for constructing individual 
  112.     graphs, a brief description of each type of graph is given, and  an 
  113.     example  of  constructing a graph of each category is demonstrated.  
  114.     The directions should become fairly intuitive after working through 
  115.     just the few examples listed here. . .
  116.                         
  117.                         
  118.                         
  119.                         
  120.                         
  121.                         
  122.                         
  123.                         
  124.                         
  125.                         
  126.                         
  127.                         
  128.      
  129.  
  130.  
  131.                      
  132. -------------------------------------------------------------------------------
  133.     
  134.     
  135.     
  136.     A.  F-2D Graph
  137.             
  138.       Description:  Graphs  up   to   four   separate   "2-dimensional" 
  139.             expressions  in  the x-y plane.  The user may graph 
  140.             both functions [i.e., equations of the form F(X)  = 
  141.             0], and non-functions [equations of the form F(X,Y) 
  142.             =  0].   Data  ranges  may  be  selected for graphs 
  143.             either automatically [auto-scaling ON], or manually
  144.             [manual-scaling];  in  the  latter case  the  graph
  145.             is shown over the range:
  146.                 
  147.                  xmin <= X <= xmax   and   ymin <= Y <= ymax, 
  148.                 
  149.             where the user selects the min. and max. values.
  150.  
  151.             
  152.         Notes:    The first form [F(X) = 0] requires a true function, 
  153.             e.g.,  F(X) = 5.0 * X + 3.0  or F(X) = sin(X).  The 
  154.             second form [F(X,Y) =  0]  may  be  used  to  graph 
  155.             "non-functions"  in  the  x-y  plane, like circles, 
  156.             hyperbola, etc.   For  example, one  would  use  an 
  157.             equation  like F(X,Y) = X*X + Y*Y - 25.0 to graph a 
  158.             circle.
  159.     
  160.             In each case, the user may specify  the  number  of 
  161.             intermediate  data  points  [n]  used  to calculate 
  162.             function values, where 3 <= [n] <= 250.   For  most 
  163.             graphs,  choosing a value of [n] between 75 and 100 
  164.             provides adequate "resolution";  larger  values  of 
  165.             [n]  produce  a  nicer-looking graph, but will take 
  166.             longer  to  calculate.   The  complexity   of   the 
  167.             function  also  impacts  the  calculation time.  On 
  168.             most machines, it shouldn't take but a few  seconds 
  169.             to generate a F(X) graph, or a minute or two for an 
  170.             F(X,Y) graph, with n = 100.
  171.  
  172.             Up to 130 characters may be entered  for  the  F-2D 
  173.             expression,    and   the   function/expression   is 
  174.             evaluated in double-precision.  Most standard  math 
  175.             functions  are  allowed; see Sect.  VI, Paragraph A 
  176.             for a complete list of  legal  functions,  and  for 
  177.             information on legal function syntax.  
  178.  
  179.  
  180.     Example #1:  Graph  the following four  equations on a single graph 
  181.              over the range -20 <= X <= 20, -2 <= Y <= 5, using n = 
  182.              100 intermediate data-points to evaluate each function:
  183.  
  184.              F(X) = sin(X) / X        
  185.              F(X) = 2.0 * sin(X) / X 
  186.              F(X) = 4.0 * sin(X) / X 
  187.              F(X) = 5.0 * sin(X) / X
  188.  
  189.             
  190.            1.  There  are  4  expressions.    Select   "number   of 
  191.                expressions"   and  select  "Four".   Select  "Enter 
  192.                expression(s)", and type:  "sin(X)/X",  "2.0*sin(X)/ 
  193.                X",  "4.0*sin(X)/X",  and  "5.0*sin(X)/X"  for the 4 
  194.                
  195.                
  196.  
  197.  
  198. -------------------------------------------------------------------------------
  199.                
  200.                
  201.                
  202.                entries (We use an upper- or lower-case "X"  as  the                
  203.                variable).
  204.  
  205.            2.  Select    "Data    ranges/scaling",    then   select 
  206.                "X-minimum" and type  "-20.0".   Select  "X-maximum" 
  207.                and  type  "20.0".  Notice floating-pt.  numbers are 
  208.                used.  Enter "-2.0" and "5.0" for  the  minimum  and 
  209.                maximum    Y-values,   respectively.    Toggle   the 
  210.                manual-scaling ON (since we are  MANUALLY  selecting 
  211.                the data-ranges).    
  212.  
  213.            3.  Select "Number of  data  points",  and  enter "100".  
  214.                This  corresponds  to  the  number  of  intermediate 
  215.                function evaluations  to  be  used  by  the  program 
  216.                within the interval (Xmin, Xmax) = (-20, 20).
  217.                 
  218.            4.  Select "Title",  and  enter "Graphs of sin(X)/X"  as 
  219.                the Main Title.        
  220.  
  221.            5.  Select "Generate 2-D graph".  After a  few  seconds, 
  222.                the result should appear on the screen...
  223.                 
  224.  
  225.            After the graph is displayed, you can try using  various 
  226.            colors   for   the   "Axis  color",  "Plot  color",  and 
  227.            "Background color"  categories.  Then  select  "Generate 
  228.            graph"  again  to  re-view  the graph.  You can continue 
  229.            trying  different settings and re-generating  the  graph 
  230.            as necessary to  obtain  a  pleasing  display.
  231.  
  232.            The  "Screen  grid  toggle"  option  allows  the user to 
  233.            switch a grid of dots for the graph on or off.
  234.                       
  235.  
  236.              
  237.     Example #2:  We'll now try an expression in X  and Y.  We'll  graph 
  238.              the equation:
  239.                
  240.                     1.5     1.5
  241.               |X|   + |Y|   = 25,    -10 <= X <= 10, -10 <= Y <= 10
  242.                
  243.                
  244.            1.  To graph an expression like this, first  rewrite  it 
  245.                in a  form ZGRAFWIN  can handle, i.e., in  the  form 
  246.                "F(X,Y) = 0".  Here, we rewrite the equation as:
  247.  
  248.                 (abs(X)) ^ 1.5 + (abs(Y)) ^ 1.5 - 25.0 = 0.0
  249.  
  250.                
  251.            2.  There  is  only  one  expression in  this  case,  so 
  252.                select "number of expressions" and enter  "1".   Now 
  253.                select  "Enter expression(s)" and type in the  form-
  254.                ula:  "(abs(X)) ^ 1.5 + (abs(Y)) ^ 1.5 - 25.0". 
  255.                
  256.            3.  Select  "Data ranges/scaling", and enter "-10.0" for 
  257.                X-minimum and Y-minimum.  Enter "10.0" for X-maximum 
  258.                and Y-maximum.  Turn Manual-scaling ON.
  259.                
  260.            4.  Select "Number of  data  points",  and  enter  "50".  
  261.                
  262.                
  263.                
  264. -------------------------------------------------------------------------------
  265.                
  266.                
  267.                
  268.            5.  Select "Generate 2-D graph".   While  the  graph  is 
  269.                calculating,  the  approximate  amount  completed is 
  270.                displayed as a percentage.  After a minute or two of 
  271.                calculation time, the graph  should  appear  on  the 
  272.                screen.
  273.                
  274.                
  275.     Example #3:  Graph the equations of a hyperbola,
  276.         
  277.                      2    2
  278.                          X  - Y = 25,  and of an ellipse,
  279.            
  280.                               2        2 
  281.                          (X/5)  + (Y/3)  = 1.
  282.  
  283.  
  284.            1.  Select  "number  of  expressions"  and  enter   "2".  
  285.                select "Enter expression(s)" and type in: "X*X - Y*Y 
  286.                -25.0" and "SQR(X/5.0) + SQR(Y/3.0) - 1.0". 
  287.            
  288.            2.  Repeat steps 3-5 of Example #2.
  289.                       
  290.             
  291.            
  292.            Notes:   For the F-2D graph, it is possible to interrupt the 
  293.             calculation process by  pressing/holding  down  the 
  294.             [Esc] key  while  the graph  is  being computed, if
  295.                 desired... 
  296.  
  297.             A ZOOM feature allows the user to "zoom  in"  to  a 
  298.             particular area of the graph.  The user is asked to 
  299.             select  a  rectangular  region  onscreen  with  the 
  300.             mouse, and the graph is then adjusted to  show  the 
  301.             new region more precisely.  
  302.         
  303.             The Up-, down-, left-, and  right-  arrows  on  the 
  304.             scroll-  bars  may  be  used to adjust the relative 
  305.             positioning of the graph (Note: Both the  ZOOM  and 
  306.             the scroll-bar action is also available on the X/Y- 
  307.             Line graph, described later).
  308.  
  309.                
  310.                
  311.                
  312.                
  313.                
  314.                
  315.                
  316.                
  317.                
  318.                
  319.                
  320.                
  321.                
  322.                
  323.                
  324.                
  325.                
  326.                
  327.                
  328.                
  329.  
  330. -------------------------------------------------------------------------------
  331.         
  332.                                 
  333.              
  334.                           
  335.     B.  G-3D Graph
  336.              
  337.  
  338.       Description:     Graphs a 3-D function Z = G(X,Y), for X, Y, and  Z
  339.              in the range (Xmin, Xmax), (Ymin, Ymax), and (Zmin,
  340.              Zmax), respectively.
  341.            
  342.             Notes:   Despite  its  appearance on the menu, no automatic 
  343.              scaling is available for  this  graph.   The  user 
  344.              should  select  values  for the min and max values 
  345.              that "include" the range of values which  will  be 
  346.              generated.  For example, if the function is: 
  347.             
  348.                      G(X,Y) = cos( 0.05 * X *Y ), 
  349.             
  350.              with -10.0 <= X <= 10.0, and -10.0 <=  Y  <=  10.0 
  351.              (as  in  the  example below), one could select the 
  352.              values (Zmin, Zmax) as (-1.0, 1.0),  so  that  all 
  353.              points of the cosine-function will be included and 
  354.              displayed.  Again, up to  130  characters  may  be 
  355.              entered  for the function G(X,Y).  The function is 
  356.              evaluated in double-precision format; see notes on 
  357.              math-functions and  ZGRAFWIN  function  syntax  in 
  358.              Sect. VI, part A, below.
  359.  
  360.              Since G(X,Y) "surface plots" require many lines to 
  361.              be  drawn,  it  may  take  a little while  for the 
  362.              program  to  draw  a  complete  graph--please   be 
  363.              patient.   You  can  abort  the graph construction 
  364.              process at any  time  while  the  graph  is  being 
  365.              created  by  pressing  the  [Esc] key -- this  may 
  366.              save you some time if you do make a mistake...  
  367.              
  368.              Naturally,  there  is  a  tradeoff  between  graph 
  369.              accuracy  and graph calculation time for this type 
  370.              of graph, and three accuracy/speed settings may be 
  371.              chosen.  For the first  pass  at  a  new  function 
  372.              you  might  want  to use the "Low accuracy / fast" 
  373.              draw option (under "Format of graph /  speed")  to 
  374.              create  a  "rough  draft",  and then for the final 
  375.              product select the "High accuracy / slow"  setting 
  376.              to  generate  a more "presentation-quality" graph.  
  377.              As you might expect,  the  higher  accuracy  graph 
  378.              looks  a  lot  better,  but  comes at considerable 
  379.              expense of CPU time--it  may   take  5-10  minutes 
  380.              to  generate  a  hi-accuracy  graph  on  a  slower 
  381.              machine...
  382.  
  383.  
  384.  
  385.           Example:   Graph the function G(X,Y) = cos( 0.05 * X*Y ), for 
  386.              X in the range (-100,100),  and  Y  in  the  range 
  387.              (-100,100).  Use medium accuracy/speed.
  388.  
  389.              
  390.              1.  Select  "Enter  3D  function",   and  type  in 
  391.                  "cos( 0.05 * X * Y ).
  392.  
  393.  
  394.  
  395.  
  396. -------------------------------------------------------------------------------
  397.              
  398.  
  399.  
  400.              
  401.              2.  Select "Data ranges", then under  the sub-menu
  402.                  enter the  values  -10.0  for X-minimum,  10.0 
  403.                  10.0 for X-maximum, -10.0 for Y-min., and 10.0
  404.                  for Y-max.,  respectively.   
  405.  
  406.              3.  Enter  -1.0  and  1.0   for Z-min. and Z-max., 
  407.                  respectively.  
  408.              
  409.              4.  Select  "Format  of  graph / speed"  and  then 
  410.                  "Medium accuracy / medium".
  411.  
  412.              5.  Use Windows to "Maximize" the screen window in 
  413.                  which ZGRAFWIN is running to full-screen (this 
  414.                  isn't  necessary,  but  seems  to   help   the 
  415.                  hidden-line  removal  algorithm for this graph 
  416.                  work a little better). 
  417.     
  418.              6.  Select  "Generate G-3D graph"  to  create  the 
  419.                  graph.
  420.  
  421.              
  422.          Notes:     The  "Screen  Frame  Toggle" option may be used to 
  423.              switch the "wire-frame" outline for the  graph  on 
  424.              or off.
  425.                  
  426.              A "band colorization" feature allows you to  iden- 
  427.              tify  six distinct z-value regions in the graph by 
  428.              color.  This feature can be  toggled  on/off  (see 
  429.              "Band colorization toggle" under "Format of graph/ 
  430.              speed").   The  color  of each band corresponds to 
  431.              each  fill color (which you can specify under  the 
  432.              "Options", "Default colors" menu).      
  433.  
  434.              If  you'd  like  to  look  at  some  other  "easy" 
  435.              3-D functions, here's some to try:
  436.                 
  437.                 
  438.                  
  439.                  sin( 0.05 * X * Y ) ,          -10 <= X <= 10
  440.                                          -10 <= Y <= 10
  441.                                           -1 <= Z <= 1    
  442.              
  443.                 
  444.                  cos( 0.5*X ) - sin( 0.5*Y ) ,  -10 <= X <= 10
  445.                                          -10 <= Y <= 10
  446.                                           -2 <= Z <= 2
  447.             
  448.                 
  449.                  sin( 0.05 * sqrt(X*X + Y*Y) ),
  450.                                 -100 <= X <= 100
  451.                                -100 <= Y <= 100
  452.                                  -1 <= Z <= 1
  453.                  
  454.              
  455.              
  456.              
  457.              
  458.  
  459.  
  460.  
  461.  
  462. -------------------------------------------------------------------------------
  463.              
  464.  
  465.              
  466.     C.  X/Y Line Graph
  467.  
  468.       Description:   Graphs up  to 1000 (x,y) data-points (total) taken 
  469.              from a data-file, displaying a user-defined symbol 
  470.              at each data point.  By using  different  symbols, 
  471.              multiple  "groups"  of  data may be displayed on a 
  472.              single X/Y graph grid.
  473.  
  474.             Notes:     Each (x,y) coordinate must be entered on  its  own 
  475.              line  in  the  data-file,  in  floating-pt. format 
  476.              (anywhere on the line, but with at least one space 
  477.              separating the x- and y-coordinates).  The  symbol 
  478.              to  be  displayed  must be a single character, and 
  479.              must follow the y-coordinate anywhere on the line.  
  480.              Each "group" of data should have a  unique  symbol 
  481.              associated with it.
  482.  
  483.              If   you  want  lines  drawn  between  data-points 
  484.              (connecting lines  may  be  added/removed  by  the 
  485.              "Connecting-line  toggle"  menu  selection), it is 
  486.              important to list  the  data-points  in  the  file 
  487.              sequentially--in the order in which the data is to 
  488.              be plotted, as in the example below. . .
  489.  
  490.  
  491.           Example:     It is desired to display five groups of (x,y) data  
  492.              on  a  graph,  and  identify the individual groups 
  493.              with the symbols "A", "B", "C", "D", and "E".
  494.  
  495.              The first data group is: (0, 10), (1, 0), (2, 30), 
  496.              (3, 20), (4, 10), and (5, 20).
  497.  
  498.              The second data group is: (0,50), (1,60),  (2,65), 
  499.              (3, 65), (4, 60), and (5, 50).
  500.  
  501.              The  third data group is: (0,90), (1,100), (2,80), 
  502.              (3, 90), (4, 100), and (5, 90).
  503.  
  504.              The  fourth  data  group  is:  (0, 110), (1, 120), 
  505.              (2, 130), (3, 120), (4, 125), and (5, 115).
  506.  
  507.              The   fifth   data  group  is:  (0, 150), (1,145), 
  508.              (2, 155), (3, 160), (4, 150), and (5, 135).
  509.  
  510.  
  511.              1.  Create  the  data-file.   Use  an ASCII editor 
  512.                  (you can use ZGRAFWIN's built-in editor if you 
  513.                  like--see section VI, part B) to create a file 
  514.                  called "xy.dat".  For convenience this file is 
  515.                  included with ZGRAFWIN [the "xy.dat" file  has 
  516.                  some  additional instructions in it, which you 
  517.                  may ignore for now, with the exception of  the 
  518.                  "#GRAPH_TYPE"  line,  and  some options in the 
  519.                  "OPTIONS" section, as will be explained].  The 
  520.                  data file looks like this:
  521.                  
  522.                         
  523.      This  tells  ZGRAFWIN   the  ->  #GRAPH_TYPE = XY_GRAPH
  524.      type of graph to construct.                
  525.                  
  526.              
  527.                           
  528. -------------------------------------------------------------------------------
  529.  
  530.              
  531.                                           
  532.      These  lines  specify some   ->   #OPTIONS = GRID ^ CONNECT ^ MANUAL^
  533.      graph options.  The  graph   ->   #XMIN    =  -1.0
  534.      has  a   background   grid   ->   #XMAX    =   6.0
  535.      ("GRID")  with  connecting   ->   #YMIN    = -20.0
  536.      lines  between data points   ->   #YMAX    = 170.0
  537.      ("CONNECT"),  and   manual         
  538.      graph scaling will be used
  539.      ("MANUAL").  The "XMIN",  "XMAX",  "YMIN",  and  "YMAX"  variables 
  540.      correspond to the min. and max.  values used on the X- and Y- axes 
  541.      on  the  graph.  If the XMIN, XMAX, YMIN, and YMAX values were not 
  542.      listed, or if the "AUTO" (automatic  scaling)  option  was  listed 
  543.      instead  of  "MANUAL"  (manual scaling), the XMIN, XMAX, YMIN, and 
  544.      YMAX values would be  automatically  determined  by  the  program, 
  545.      based  upon the X- and Y- input-data ranges occurring in the data.  
  546.      For now  don't  worry  too  much  about  the  specifics for  these 
  547.      "#OPTIONS"  command-lines.   The  next  examples will help explain 
  548.      their usage and purpose more clearly... 
  549.      
  550.                                                 0.0   10.0   A
  551.                                 1.0    0.0   A
  552.      This is the  first group of            2.0   30.0   A
  553.      data-points,  which will be   ->       3.0   20.0   A
  554.      displayed with 'A' symbols.            4.0   10.0   A
  555.                                 5.0   20.0   A
  556.      Blank lines or lines with a     
  557.      "!" in the first column are   ->
  558.      comment  lines,   and   are
  559.      ignored by ZGRAFWIN.       
  560.                                  0.0   50.0   B
  561.      Second group of data-points            1.0   60.0   B
  562.      will be displayed using 'B'   ->       2.0   65.0   B
  563.      symbols.                               3.0   65.0   B
  564.                                 4.0   60.0   B
  565.                                 5.0   50.0   B
  566.      More Blank lines (ignored)    ->     
  567.     
  568.      (2 More Groups  of Data  Go  
  569.      Here,   And  Are  Displayed  
  570.      Using 'C'  And 'D' Symbols.   ->      
  571.      The data  is  not  repeated   
  572.      here, for reasons of space). 
  573.                                  0.0   150.0   E
  574.      Fifth group of data-points            1.0   145.0   E
  575.      will be displayed using 'E'   ->      2.0   155.0   E
  576.      symbols.                     3.0   160.0   E
  577.                                4.0   150.0   E
  578.      Last line of file           ->        5.0   135.0   E
  579.  
  580.              
  581.                  When done editing, save  the file, and  return 
  582.                  to the ZGRAFWIN "X/Y Line" menu. 
  583.                  
  584.              2.  Under the "X/Y Line" top heading, select "Load 
  585.                  data file".  When prompted for the name of the 
  586.                  data-file, type "xy.dat".  The program  should 
  587.                  indicate that 30 data-points were "Loaded OK".
  588.  
  589.              3.  Select "Generate X/Y line graph"  to  draw the
  590.                  graph. 
  591.  
  592.  
  593.  
  594. -------------------------------------------------------------------------------
  595.                  
  596.  
  597.           
  598.     D.  Polar Graph
  599.  
  600.  
  601.           Description:   Graphs  up  to  1000 data-points (total) taken 
  602.                  from a data-file,  displaying  a  user-defined 
  603.                  symbol at each data point.  By using different 
  604.                  symbols,  multiple  "groups"  of  data  may be 
  605.                  displayed on a single polar graph grid.  Input 
  606.                  data may be in either RECTANGULAR (x,y) format 
  607.                  or in POLAR (radius, angle) format.
  608.  
  609.                    
  610.                 Notes:   (Same as for X/Y Line Graph)
  611.                 
  612.  
  613.               Example:   Graph the 22 data points listed  in  the  file 
  614.                  "polar.dat",  included  with  ZGRAFWIN.  Since 
  615.                  data in this file is  in  polar  format,  each 
  616.                  line of data in the file is of the form:
  617.         
  618.                     [r]  [theta]  [symbol] ,
  619.                  
  620.                  where  [r]  and [theta] are the standard polar 
  621.                  radius  and  angle (in rads) identifiers,  and
  622.                  [symbol] is the symbol to be displayed (="*").   
  623.                  
  624.                  1.  Use the ZGRAFWIN editor  to  look  at  the 
  625.                  "polar.dat"  file  (select  "Editor" under 
  626.                  the "Options" menu to bring up the editor, 
  627.                  then  "Open"  to Open a File, and type  in 
  628.                  "polar.dat").   The  lines  beginning with 
  629.                  "#" are command-lines and provide specific 
  630.                  graph  information   to   ZGRAFWIN.    For 
  631.                  example, there are commands to specify the 
  632.                  main title and the horizontal and vertical 
  633.                  titles for the graph.  
  634.                  
  635.                  There is also an  "#OPTIONS"  line.   This 
  636.                  command  allows the user to specify any of 
  637.                  several options for the graph.   Here,  to 
  638.                  inform  ZGRAFWIN  that data for this graph 
  639.                  is  being  entered  in  POLAR  [not  (x,y) 
  640.                  RECTANGULAR]   format,  the "POLAR" switch
  641.                  is specified  on  the  "#OPTIONS"  line. 
  642.   
  643.                  The last part of the file is just  a  list 
  644.                  of 22 data points.
  645.                  
  646.                  
  647.                  2.  When  finished  examining the file, select 
  648.                  "Load data file".  When prompted  for  the 
  649.                  name  of  the data-file, type "polar.dat".  
  650.                  ZGRAFWIN   should   indicate  that the  22 
  651.                  data-points were "Loaded OK".
  652.                 
  653.                  3.  Select "Generate polar graph"  to draw the 
  654.                  graph.
  655.  
  656.                  
  657.                      
  658.  
  659.                  
  660. -------------------------------------------------------------------------------
  661.  
  662.  
  663.  
  664.  
  665.     E.  Log Graph
  666.  
  667.  
  668.         Description:   Graphs  up  to  1000  (x,y)  data-points (total) 
  669.                taken from a data-file, in a similar  format  to 
  670.                that  used  in  the  X/Y  line  graphs discussed 
  671.                earlier, but on a logarithmic-type grid.
  672.  
  673.               Notes:   (See  X/Y  Line  Graph for description of data- 
  674.                file formats).
  675.  
  676.                Three  styles  of  logarithmic  graphs  may   be 
  677.                constructed:
  678.  
  679.                 1.  Linear X, Log Y
  680.                 2.  Linear Y, Log X
  681.                 3.  Log X,    Log Y
  682.  
  683.                For the log scales, it is required that:
  684.  
  685.                 1.  All data coordinates be > 0.0.
  686.  
  687.                 2.  The   ratio   of  largest  to  smallest 
  688.                     coordinates  in  the  graph  must   not 
  689.                     exceed 10^5.
  690.  
  691.                     Example:  Given the data-points:
  692.  
  693.                           (1.0, 1.0),
  694.          THIS EXAMPLE WILL NOT WORK !  ->    (2.0, 100.0),
  695.                           (3.0, 1000.0),
  696.                           (4.0, 1000000.0)
  697.  
  698.  
  699.                     one could create a log-log graph  using 
  700.                     only  the  first 3 data-points, because 
  701.                     if the 4th  data-point  were  included, 
  702.                     the  y-coordinate ratio would be 10^6 / 
  703.                     1.0 = 10^6, which exceeds  the  maximum 
  704.                     allowable ratio (10^5).
  705.  
  706.  
  707.         Example:   Display  two groups of  data on a log-log graph;
  708.                plot the first group  of  data  using  plus  (+) 
  709.                symbols, the second group using "oh" (o's).
  710.  
  711.                The  first  group  of  data  is: (1,8), (10,80), 
  712.                (100,800), and (1000,8000).
  713.  
  714.                The   second   group   is:  (50,50),  (500,500), 
  715.                (5000,5000), and (50000,50000).
  716.  
  717.  
  718.                1.    First create the data-file.   Use an  ASCII
  719.                 editor to edit the file "log.dat", so  that 
  720.                 it  looks  like this (notice that floating-
  721.                 pt. values are used for the data points):
  722.     
  723.  
  724.                  
  725.                  
  726. -------------------------------------------------------------------------------
  727.  
  728.                  
  729.                             ! ************************
  730.     The "!" symbol in the 1st col. ->  ! * Sample Log Graph. . .
  731.     indicates that these are com-      ! ************************
  732.         ment lines.
  733.                     
  734.     The '#' symbol in  1st  column ->  #GRAPH_TYPE = LOG 
  735.     denotes a  command line.  Here     #OPTIONS    = LOG_LOG ^ CONNECT ^
  736.     ZGRAFWIN is told  that this is
  737.         a log graph, and we've  chosen
  738.     the  LOG_LOG  ( log-X, log-Y ) 
  739.     format.   The 2nd option  says    
  740.     that line-connection is turned
  741.     on, so that  lines  are  drawn
  742.     between data points.   Because 
  743.     there are two options  on  one
  744.     line, each option is separated 
  745.     with  the  carat "^" delimiter
  746.     (The delimiter's  needed  when 
  747.     there  are  two  or more words 
  748.     or fields to separate).
  749.             
  750.     The title of the graph is also ->  #MAIN_TITLE = Sample Log Graph ^
  751.     provided.  The carat symbol is
  752.     used to indicate  the  end  of
  753.     the  string  here  also (Since 
  754.     titles may contain  whitespace 
  755.     between words, a space is  not
  756.     used as the delimiter).            
  757.  
  758.     Next,  set  the    background, ->  #BKG_COLOR   = 0
  759.     axis, and plot colors to black       #AXIS_COLOR  = 12
  760.     (color 0), bright  red  (color       #PLOT_COLOR  = 13
  761.     12), and bright magenta (color     #FILL_COLORS = 13 ^ 14 ^
  762.         13), respectively.   Two  fill
  763.     colors  (bright   magenta  and
  764.     bright yellow) are also listed. 
  765.     See Note #2  in Part VI, Sect. 
  766.     C,  "Command   Line   Syntax", 
  767.     about Fill Colors.
  768.  
  769.     "#DATA" is an optional identi- ->  #DATA
  770.     fier  to  indicate  that  the         1.0      8.0      +
  771.     8 data-points now  follow.           10.0     80.0     +
  772.                               100.0    800.0    +
  773.     Note:  For  more   details  on        1000.0   8000.0   +
  774.     the  "#" commands and options,
  775.     refer to Section VI, Part C.          50.0     50.0     o
  776.                                           500.0    500.0    o
  777.                                           5000.0   5000.0   o
  778.                                           50000.0  50000.0  o
  779.  
  780.                    When done  editing the  data file, return to 
  781.                        the Log Graph menu.
  782.                  
  783.                2.  Under  the  "Log  Graph" top heading, select 
  784.                    "Load data file".  Type in "log.dat" as  the 
  785.                    name   of  the  file.   The  program  should 
  786.                    indicate 8 data-points were "Loaded OK".
  787.  
  788.                3.  Select "Generate log graph" to draw the graph. 
  789.                    
  790.     
  791.  
  792. -------------------------------------------------------------------------------
  793.  
  794.                                        
  795.                     
  796.     F.  Bar Graph
  797.  
  798.         Description:   Allows the user to make a bar graph, of up to  3 
  799.                separate groups of bars.
  800.  
  801.  
  802.           Notes:   The  total number of bars in the graph must  not 
  803.                exceed  30.   The  number  of bars is calculated 
  804.                from the formula:
  805.  
  806.                (# Bars,  = (# Groups)  x  (# Samples per Group)
  807.                 Total )
  808.  
  809.                As an example, the program could handle 3 groups 
  810.                of bars, with 10 samples in each group (30  bars 
  811.                total),  but not 2 groups of 16 samples each (32 
  812.                bars total).
  813.                 
  814.                [Note:  the  term "sample" is used here somewhat 
  815.                loosely; sampling in a statistical sense is  not 
  816.                necessarily implied...]    
  817.  
  818.  
  819.         Options:   2-D or 3-D bars  may  be  drawn;  the fill-color  
  820.                of each bar (group) may be  chosen.  Data may be
  821.                entered in  manually  as  in  Example #1  below,  
  822.                or  taken  from  a  data  file as in Example #2. 
  823.                Automatic  or  manual  scaling  may  be  used to 
  824.                determine the range of bar heights on the y-axis.  
  825.  
  826.                  
  827.          Example #1:   Create a 3-D Bargraph entitled "Average Rainfall
  828.                (in.), Jan-May", for 3 cities, using the follow-
  829.                ing rainfall data:
  830.              
  831.                Chicago:
  832.                  Jan.: 18, Feb.: 25, Mar.: 30, Apr: 40, May: 35.
  833.                New York:
  834.                  Jan.: 22, Feb.: 33, Mar.: 20, Apr: 11, May: 20.
  835.                Seattle:
  836.                  Jan.: 58, Feb.: 72, Mar.: 40, Apr: 35, May: 25.
  837.                 
  838.  
  839.                1.  For this example, there are three groups  of 
  840.                    bars  (1 bar group for each city), and there 
  841.                    are five samples in each group.  Select "Bar 
  842.                    groups", and enter "3";  select  "Number  of 
  843.                    samples/group" and enter "5".
  844.  
  845.                2.  Select "Enter data" and manually  enter  the 
  846.                    15  rainfall  quantities  into  the first 15 
  847.                    cells on the form entry  screen.   We  enter 
  848.                    the   first   sample  for  the  first  group 
  849.                    (Chicago), then the  first  sample  for  the 
  850.                    second  group  (New  York),  then  the first 
  851.                    sample for the third group (Seattle).   Then 
  852.                    we enter the second samples  for  the first, 
  853.                    second,  and  third  groups,   respectively, 
  854.  
  855.  
  856.              
  857.              
  858. -------------------------------------------------------------------------------
  859.  
  860.                    
  861.              
  862.                    etc.  [Tab] may be used  to  move  from  one 
  863.                    field  to  the next on this screen.  So type 
  864.                    in:            
  865.                                 
  866.                    "18.0 [Tab]  22.0 [Tab]  58.0 [Tab]
  867.                     25.0 [Tab]  33.0 [Tab]  72.0 [Tab]
  868.                     30.0 [Tab]  20.0 [Tab]  40.0 [Tab]
  869.                     40.0 [Tab]  11.0 [Tab]  35.0 [Tab]
  870.                     35.0 [Tab]  20.0 [Tab]  25.0 [Tab]".
  871.                    
  872.                    Then select the "OK" button.
  873.  
  874.  
  875.                3.  Select  "Item  titles"  and  enter  the five 
  876.                    individual sample descriptions, i.e.,  "Jan. 
  877.                    [Enter]  Feb.   [Enter]  Mar.   [Enter] Apr.  
  878.                    [Enter] May [Enter]".
  879.                     
  880.                4.  Select "Legend titles", and type  in  the  3 
  881.                    group  legend  titles, i.e., "Chicago", "New 
  882.                    York", "Seattle" (press [Enter] after each).
  883.  
  884.                5.  Select  "Title",  then  "Main  Title",  then 
  885.                    enter "Average Rainfall (in.), Jan-May".
  886.  
  887.                6.  Select "Style", then "3-D Bars".
  888.  
  889.                7.  Press "Generate bargraph" to draw the graph.
  890.                
  891.                8.  To experiment, you may want to try selecting 
  892.                    different bar fill-colors, and re-generating 
  893.                    the  graph.  By the way, each  unique  fill-
  894.                    color corresponds to the color of an indiv-
  895.                    idual bar group in the set.
  896.  
  897.                             
  898.           Example #2:   Create the same graph  demonstrated  above,  but 
  899.                use  the input data from the data-file "bar.dat" 
  900.                [This file contains  the  same  data  which  was 
  901.                entered manually in Example #1].  
  902.                 
  903.                1.  Use an  editor (e.g., the  ZGRAFWIN  editor) 
  904.                    to  edit  the file "bar.dat".  We'll examine 
  905.                    in detail the commands present in this  file 
  906.                    (listed here for convenience):
  907.             
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924. -------------------------------------------------------------------------------
  925.              
  926.              
  927.                           
  928.     Indicate the Type of Graph ->  #GRAPH_TYPE = BAR_GRAPH
  929.  
  930.     Indicate the Number of Bar ->  #NUMBER_OF_GROUPS  = 3
  931.     Groups and Samples in  the     #NUMBER_OF_SAMPLES = 5
  932.     bar graph.
  933.  
  934.     Specify the various  graph ->  #DRAW_COLOR    =  15
  935.     Colors  and  Fill Colors--     #BKG_COLOR     =  0
  936.     if not specified here, the     #FILL_COLORS   =  12 ^ 13 ^ 14 ^
  937.     current values  for  these                                  
  938.     parameters in memory  will
  939.     be used.  There are  3 bar
  940.     groups, so  3  fill-colors 
  941.     are used.  Bright red (12) 
  942.         is  used  in the  1st  bar  
  943.         group, Bright magenta (13) 
  944.         in  the  2nd,  and  Yellow 
  945.     (14) is used in the third.
  946.     We   use   a  bright-white 
  947.         border (15), and  a  black
  948.         (0) background color.
  949.     
  950.     Provide legend, item,  and ->  #MAIN_TITLE =   Av. Rain.,  Jan-May^
  951.     main graph titles.   There     #LEGEND_TITLES = Chic.^ NY ^Seattle^
  952.     are 3 group legends and  5     #ITEM_TITLES  = Jan^Feb^Mar^Apr^May^
  953.     item  samples  (words  are 
  954.     abbreviated in the  titles 
  955.     here to allow lines to fit
  956.     on this page, but the file 
  957.     uses the complete strings).
  958.  
  959.     Indicate that a 3-D [not a ->  #OPTIONS = 3D ^ AUTO ^
  960.     2-D graph]  will be drawn.
  961.     Use automatic [not manual,
  962.     user-specified] bar-height
  963.     scaling.
  964.  
  965.     Finally, list the data  to ->  #DATA
  966.     appear in the graph.  Note          18.0   22.0   58.0
  967.     that each row  corresponds        25.0   33.0   72.0
  968.     to the data for  1 sample,        30.0   20.0   40.0
  969.     listing the  rainfall  for        40.0   11.0   35.0
  970.     Chicago,   New York,   and        35.0   20.0   25.0
  971.     Seattle, respectively.
  972.                 
  973.                   
  974.                2.  After editing is complete, select "Load data 
  975.                    file", and type in "bar.dat".  Program  will 
  976.                    indicate that data for 3 groups of bars, and
  977.                    5 samples per group was loaded.
  978.                
  979.                3.  Press "Generate bargraph" to draw the graph.
  980.         
  981.         
  982.             Note:  The  Miscellaneous  section,  part  C,  provides 
  983.                complete details on input data-file formats  for 
  984.                bar  graphs,  covering formats for one, two, and 
  985.                three  groups  of  data.   For simplicity,  that 
  986.                information is not discussed in detail here.. 
  987.                 
  988.  
  989.              
  990. -------------------------------------------------------------------------------
  991.              
  992.                           
  993.                
  994.     G.  Pie Graph
  995.                
  996.  
  997.         Description:   Allows the user to construct a pie graph.
  998.  
  999.                
  1000.           Notes:   The  Maximum  Number of Slices in the Pie is 10.  
  1001.                Data is averaged, so  the  total  of  the  slice 
  1002.                magnitudes  need  not  necessarily add up to 100 
  1003.                (i.e., 100 percent).
  1004.                
  1005.         Options:   2-D  and 3-D pies may be drawn.  Fill-colors may 
  1006.                be selected for each slice  in  the  pie,  or  a 
  1007.                different  "cross-hatch"  pattern can be used to 
  1008.                identify each slice.  Input data may be  entered 
  1009.                manually  (as  in  the example, below), or taken 
  1010.                from a data file (see the Miscellaneous section, 
  1011.                part C, for pie graph input data-file  formats).  
  1012.                The  file  "pie.dat" contains the input data for 
  1013.                this example, if  you'd  like  to try  loading a 
  1014.                data-file  instead  of entering the  data-values 
  1015.                in manually.
  1016.  
  1017.                
  1018.          Example:  Create a 3-D Pie Graph entitled "Grain Sales, by 
  1019.                Percent" with the  following  data:  Wheat:  30, 
  1020.                Corn: 25, Soy: 20, Rice: 10, Other: 15.
  1021.                
  1022.                1.  Select "Number of slices" and enter "5".
  1023.  
  1024.                2.  Select  "Enter  data"  and  enter  the  five 
  1025.                    percentages in floating-point format,  i.e., 
  1026.                    "30.0 [Tab] 25.0 [Tab] 20.0 [Tab] 10.0 [Tab] 
  1027.                    15.0  [Tab]",  into the first 5 cells of the 
  1028.                    form.
  1029.  
  1030.                3.  Select  "Style", then "3-D".
  1031.  
  1032.                4.  Select "Title" and  enter  "Grain  Sales  by
  1033.                    Percent" as the main title.
  1034.                                   
  1035.                5.  Select "Item titles" and enter the five item 
  1036.                    descriptions,   i.e.,  "Wheat  [Enter]  Corn 
  1037.                    [Enter]   Soy [Enter]   Rice [Enter]   Other 
  1038.                    [Enter]".
  1039.                 
  1040.                6.  Select "Generate piegraph" to draw the graph.   
  1041.  
  1042.  
  1043.                    Notes:  Radius Adjustment
  1044.     
  1045.                    When  printing  a  pie  graph  (printing  is 
  1046.                    explained in Section V),  you  may  find  it 
  1047.                    desirable  to  adjust the radius of the pie, 
  1048.                    to produce a smaller/larger pie circle.  Any 
  1049.                    floating pt. value between 0.1 and 10.0  may 
  1050.                    be  used.   5.0  represents a default radius 
  1051.                    value, which may/may not be appropriate  for 
  1052.                    your printer...        
  1053.              
  1054.  
  1055.  
  1056. -------------------------------------------------------------------------------             
  1057.              
  1058.              
  1059.              
  1060.     H.  Area Graph
  1061.  
  1062.  
  1063.          Description:  Graphs up  to  1000  (x,y)  data-points  (total) 
  1064.                taken   from  a  data-file,  as  "area"  curves, 
  1065.                displaying a user-defined symbol  at  each  data 
  1066.                point.   By  using  different  symbols, multiple 
  1067.                "groups" of data may be displayed  on  a  single 
  1068.                X/Y graph grid.
  1069.  
  1070.                
  1071.            Notes:  This  graph  is  much  like  the X/Y line graph, 
  1072.                except that instead of showing lines, this graph 
  1073.                shows "area" regions bounded by the data points. 
  1074.  
  1075.                The data point specification format is the  same 
  1076.                as  that  for  the  xy-line  graph:  each  (x,y) 
  1077.                coordinate must be entered on its  own  line  in 
  1078.                the  data-file,  and  the symbol to be displayed 
  1079.                must follow the y- coordinate on the line.  Each 
  1080.                "group" of data  should  have  a  unique  symbol 
  1081.                associated with it.
  1082.  
  1083.                Again,  it  is  extremely  important to list the 
  1084.                data-points in the file sequentially--order  the 
  1085.                data groups themselves (from smallest to largest 
  1086.                in  terms  of  the y-coordinates), and order the 
  1087.                data  within  each  group  (starting  with   the 
  1088.                smallest  x-coord.,  and ending with the largest 
  1089.                x-coord.), as in the example  below.   Otherwise 
  1090.                this  graph  will  look like a mess, with "fill" 
  1091.                colors splashed everywhere!
  1092.             
  1093.         Options:   Separate fill colors for  each  individual  data 
  1094.                region  may be selected.  Symbols themselves can 
  1095.                be shown or hidden;  you  may  use  the  "Symbol 
  1096.                display   toggle"   option   to   control   this 
  1097.                operation.
  1098.  
  1099.  
  1100.            Example #1:  It  is desired to display five  groups of (x, y) 
  1101.                data on a graph,  and  identify  the  individual 
  1102.                groups  with  the symbols "A"  through  "E".  To 
  1103.                make things easier, we'll use the same  data  as 
  1104.                that used earlier for the x/y line graph.
  1105.  
  1106.  
  1107.                1.  Create  the  data-file.  Use an ASCII editor 
  1108.                    to  edit  a file "area.dat", containing  the
  1109.                    data  points  and  symbols.   Since the data 
  1110.                    here is identical with that used in the x/y- 
  1111.                    line  graph example, one could edit the data 
  1112.                    file for that graph, but for convenience you 
  1113.                    can just use the  "area.dat"  file  included 
  1114.                    with  ZGRAFWIN -- it already has appropriate 
  1115.                    titles and graph colors specified in it...
  1116.                 
  1117.                    At this point most of the  commands  in  the 
  1118.  
  1119.                           
  1120.              
  1121.              
  1122. -------------------------------------------------------------------------------
  1123.              
  1124.                  
  1125.                  
  1126.              
  1127.                    data  file  should  be  familiar.   The only
  1128.                    statement which might  have you wondering is
  1129.                    the line:
  1130.                 
  1131.                    #OPTIONS = NO_SYMBOLS
  1132.                 
  1133.                    This  just means that graph symbols will not 
  1134.                    be displayed  on  the  graph  at  each  data 
  1135.                    point,  (this  is the default option, but it 
  1136.                    won't hurt to list it).  If we DID  want  to 
  1137.                    see the symbols we could use:
  1138.                 
  1139.                    #OPTIONS = SYMBOLS .    
  1140.                 
  1141.                    Also,  you may have noticed that we got away 
  1142.                    without using the underscores on some of the 
  1143.                    commands and identifiers--e.g., we were able 
  1144.                    to say "AXIS COLOR" instead of "AXIS_COLOR", 
  1145.                    etc.  This  works  because  ZGRAFWIN's data- 
  1146.                    file  parser  scans  each  line  looking for 
  1147.                    certain  unique  "tokens"  (in   this   case 
  1148.                    "AXIS",  not  the  full  "AXIS_COLOR" is the 
  1149.                    token).   Thus,  it  is  possible   to   use 
  1150.                    alternate,    more   "English-language-like" 
  1151.                    versions of some of the commands.  And don't 
  1152.                    worry.  If  you  DO  happen  to  specify  an 
  1153.                    illegal  expression on a line, ZGRAFWIN will 
  1154.                    let you know about  it.   The  program  will 
  1155.                    stop  and  display  the  offending token and 
  1156.                    line number in the data file, so you can  go 
  1157.                    back and correct the error...  
  1158.  
  1159.                2.  Under  the "Area" top heading, select  "Load 
  1160.                    data file".  When prompted for the  name  of 
  1161.                    the data-file, type "area.dat".  The program 
  1162.                    should  indicate  that  30  data-points were 
  1163.                    "Loaded OK".
  1164.  
  1165.                3.  Select  "Generate  area  graph" to draw  the 
  1166.                    graph.  Again, you may want to experiment by 
  1167.                    changing fill colors,  which will change the
  1168.                    colors of individual area regions. 
  1169.  
  1170.  
  1171.          Example #2:   For  this  example,  we'll  create an area graph 
  1172.                using a function F(X),  and  demonstrate  how  a 
  1173.                function  can be used to supply "input" data for 
  1174.                a graph. . .  
  1175.                 
  1176.                1.  Create the function graph "F(X)  =  sin(X)/X", 
  1177.                    as  in  the F-2D graph example... 
  1178.                 
  1179.                2.  Move  over  to  the  Area  graph  menu,  and 
  1180.                    select  "Generate area graph".  Since no new 
  1181.                    file  was  loaded,  the  data  currently  in 
  1182.                    memory  from  the  F(X)  = sin(X)/X graph is 
  1183.                    utilized.  What's  drawn  is  the   F(X)   = 
  1184.                    sin(X)/X curve, as a  bounded area region...
  1185.                
  1186.  
  1187.  
  1188. -------------------------------------------------------------------------------
  1189.  
  1190.  
  1191.  
  1192.                3.  Each individual data point evaluated by  the 
  1193.                    function is now displayed as an asterisk--if 
  1194.                    you don't want to display these data points, 
  1195.                    just  toggle  the  symbol  display  off, and 
  1196.                    regenerate the graph... 
  1197.     
  1198.                 
  1199.             Note:  It is possible  to  "pipe"  the  input  data 
  1200.                    calculated   via  a  function/expression  to 
  1201.                    another graph (as was done in this  example) 
  1202.                    in the case of the X/Y line, Log, Polar, and 
  1203.                    Area  graphs.  It is also possible to read a 
  1204.                    data file in for one type of graph, and then 
  1205.                    graph  it  (by  selecting  "Generate  [graph 
  1206.                    type]") on another menu. This last variation 
  1207.                    could  well  result in unpredictable program 
  1208.                    behaviour,    though,    if     not     done 
  1209.                    intelligently.   E.g.,  if  data  for  an XY 
  1210.                    graph is used to generate  a  pie  graph,  a 
  1211.                    silly-looking pie will be drawn.
  1212.                          
  1213.                  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.                    
  1223.                    
  1224.                    
  1225.                    
  1226.                    
  1227.                    
  1228.                    
  1229.                    
  1230.                    
  1231.                    
  1232.  
  1233.                    
  1234.                    
  1235.                    
  1236.                    
  1237.                    
  1238.                                       
  1239.                    
  1240.                    
  1241.                    
  1242.                    
  1243.                    
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.                    
  1250.                    
  1251.  
  1252.  
  1253.                                     
  1254. -------------------------------------------------------------------------------
  1255.     
  1256.                            
  1257.                                       
  1258.    V.  PRINTING GRAPHS
  1259.  
  1260.     Graphs  may  be  printed by selecting the "Print graph" option (the 
  1261.     last item on each graph pull-down  menu).   Note  that  one  should 
  1262.     first  generate  the  graph  on  the  screen (with "Generate [graph 
  1263.     type]") prior to printing it using "Print [graph type]".  
  1264.  
  1265.     Two  different  print-modes  are  supported   in   ZGRAFWIN--Screen 
  1266.     Printing  and  Direct-GDI  Printing.  Screen-printing, as the title 
  1267.     suggests, takes a bit-mapped "picture" of the screen, and sends  it 
  1268.     to   the  printer.   Direct-GDI  printing  involves  directing  the 
  1269.     Windows'   Graphics-Device-Interface   (GDI)   calls   (i.e.,   the 
  1270.     function-calls  used  to  create  a graph) directly to the printer.  
  1271.     There are advantages and disadvantages to each style of printing...
  1272.     
  1273.     The  screen-print  format  is generally faster (because Windows can 
  1274.     use a "banding" technique to print the data), but it may not always 
  1275.     produce elegant-looking output, especially if Windows has to  scale 
  1276.     the  bit-mapped  image  significantly to meet the dimensions of the 
  1277.     printed page.  The direct-GDI call approach is slower, but can take 
  1278.     advantage of the full pixel-resolution of the  printer,  and  often 
  1279.     produces more professional-looking output. 
  1280.  
  1281.     Print settings may be selected under the "Options" menu.   Briefly, 
  1282.     the options available are:
  1283.                 
  1284.     
  1285.         1.  Area  to  Print  (Selects Region of the Window  to Print--
  1286.         This Applies  for  Screen-Print Modes Only -- See Item #2,
  1287.         Below):      
  1288.         
  1289.             Whole Window - Prints Window Interior  (Client Area)  Plus 
  1290.                        Window Caption, Window Border, etc.
  1291.         
  1292.             Client Area  - Prints Window Interior (Client Area) Only.
  1293.         
  1294.                 
  1295.         2.  Type of Print  (Selects  Screen-Print  Mode  or  Direct-GDI 
  1296.         Mode,  and allows specification of scaling for Screen-Print 
  1297.         modes):
  1298.     
  1299.             Best-Fit  - This  type  of   Screen-Printing   forces   the 
  1300.                 horizontal  dimension  of  the printed image to 
  1301.                 full-page width, with  the  vertical  dimension 
  1302.                 set  to maintain the proper aspect ratio.  This 
  1303.                 scaling  mode  is  best  for  printing   graphs 
  1304.                 utilizing circles, e.g., polar and pie graphs.
  1305.  
  1306.         Full-Page - This  Screen-Print  mode  attempts to scale the 
  1307.                 output to cover approximately the whole printed 
  1308.                 page. 
  1309.                      
  1310.             1X-2X-3X  - This  Screen-Print  mode either uses no scaling 
  1311.                 (the same image pixel height and width  on  the 
  1312.                 screen  are  used in the printed output), OR it 
  1313.                 scales by exact multiples (2, 3,  4,  etc.)  of 
  1314.                 the   screeen   pixel   height  and  width,  as 
  1315.                 necessary to cover  as  much  as  the  page  as 
  1316.                 possible.  This setting is best for graphs with 
  1317.     
  1318.     
  1319.     
  1320. -------------------------------------------------------------------------------
  1321.     
  1322.     
  1323.         
  1324.                 a  lot of "fine detail", where the aspect ratio 
  1325.                 isn't critical...
  1326.     
  1327.            Direct-GDI - This  mode  does not use "screen-printing", but 
  1328.                 sends Windows' GDI  commands  directly  to  the 
  1329.                 printer.  
  1330.                   
  1331.         
  1332.        3.  Output Color Format (Adjusts Graph for Printing of Color or
  1333.            Black-and-White Output): 
  1334.         
  1335.         Color  - This selection prints the colors and fill areas as 
  1336.              shown on the screen.
  1337.         
  1338.        Blk-and-Wht - If this selection is chosen, graph entities (axis, 
  1339.              plot,  background  colors, fill-colors, etc.) will 
  1340.              be adjusted or converted to  appropriate  settings 
  1341.              that   are  visible  for  black-and-white  printed 
  1342.              output, immediately before the graph  is  printed.  
  1343.              For example, color "solid" fills will be converted 
  1344.              to "hatch" fills on the pie, bar, and area graphs, 
  1345.              so that they will be visible in black-and-white...
  1346.     
  1347.     
  1348.     You  are encouraged to experiment with these print setup options as 
  1349.     necessary to produce  good  results.   You  may  wish  to  use  the 
  1350.     "Direct-GDI"  print-mode  most  of  the  time.   Because  of  speed 
  1351.     and memory-usage considerations, however, the screen-print mode  is
  1352.     recommended  for printing G-3D graphs.  
  1353.  
  1354.     You may find it useful to vary the print options available for your 
  1355.     specific print driver under the Windows Control  Panel  also.   For 
  1356.     example,  I  prefer  to  use  "landscape" orientation when printing 
  1357.     graphs on 8.5 x 11-inch paper with the IBM Proprinters driver on my 
  1358.     "low-end"  dot-matrix printer, because many graphs come out looking 
  1359.     better using the "Direct-GDI" print-format with this orientation.
  1360.     
  1361.     By  the way, instead of using "Print [graph type]", you can also do 
  1362.     a "screen print" of the window at any  time  (by  selecting  "Print 
  1363.     window"  on  the  "Options"  menu).
  1364.     
  1365.     Once  you start the print operation, a "Preparing for Print" dialog 
  1366.     box will appear onscreen, with a "Cancel" button to abort printing. 
  1367.     After the dialog box goes away, the Print Manager  will  take  over 
  1368.     and  handle  the  rest of the job.  At this point, you may click on 
  1369.     the Print Manager icon and select "Abort" to halt printing...
  1370.  
  1371.     
  1372.     *******************************************************************    
  1373.     *******                                                     *******
  1374.     *******           WHAT TO DO IF YOU ARE UNABLE TO PRINT...     *******
  1375.     *******                                                     *******
  1376.     *******************************************************************
  1377.     
  1378.     
  1379.     If  printing  doesn't  work,  check  your  "WIN.INI"  file  in  the 
  1380.     directory where Windows was installed (e.g., "\WINDOWS") for proper 
  1381.     printer-setup information, as explained in the next sections...
  1382.  
  1383.         
  1384.     
  1385.     
  1386. -------------------------------------------------------------------------------
  1387.  
  1388.  
  1389.     
  1390.     In examining WIN.INI, printers are listed in two or three different 
  1391.     sections--the  [windows]  section,  and later in the [PrinterPorts] 
  1392.     and/or [devices] section.  For ZGRAFWIN printing  to  operate,  you 
  1393.     need  to  have a string with your printer device name, driver name, 
  1394.     and the output port required listed in the first [windows]  section 
  1395.     of the file, like this:
  1396.     
  1397.         
  1398.         [windows]
  1399.         [other lines here...]
  1400.         device=IBM Graphics,IBMGRX,LPT1:
  1401.             
  1402.         
  1403.     In this case, the device name is IBM Graphics, the driver  name  is 
  1404.     IBMGRX,  and  the  output  port  is  LPT1.   If  you're  unsure  of 
  1405.     appropriate device/driver/port selections, you may get  some  ideas 
  1406.     by  looking  in the [PrinterPorts] or [devices] section of WIN.INI.  
  1407.     Make sure that the driver-file exists (e.g,  in  this  case,  there 
  1408.     must  be  a "IBMGRX.DRV" file in the \WINDOWS\SYSTEM directory) and 
  1409.     the output port is operational on your computer.
  1410.         
  1411.     If  your  WIN.INI file does not have  the  right  driver/port/etc.,
  1412.     you'll need to edit it so that it contains the correct information.
  1413.  
  1414.     ┌-------------------------------------------------------------------┐
  1415.     | IMPORTANT:  PLEASE MAKE A COPY OF YOUR ORIGINAL  "WIN.INI" FILE   |
  1416.     |          before making changes to it--if something goes wrong  |
  1417.     |              you'll need a backup in order to run Windows!         |
  1418.     └-------------------------------------------------------------------┘
  1419.     
  1420.     After editing, save the file and return to Windows...
  1421.     
  1422.     
  1423.     Example:  Create and Print a Bar Graph. 
  1424.  
  1425.         1.  Create the bar graph given in Sect.  IV,  part  F.   Select 
  1426.         "Style", then "Single-color graph", and generate the graph.
  1427.                               
  1428.         2.  When the graph is displayed  onscreen,  select  "Print  bar 
  1429.         graph".   If  your  settings  in  "WIN.INI" are correct, as 
  1430.         discussed above, the graph should start  printing  after  a 
  1431.         few seconds...
  1432.           
  1433.               
  1434.  
  1435.     
  1436.     
  1437.     
  1438.     
  1439.     
  1440.     
  1441.     
  1442.     
  1443.  
  1444.     
  1445.     
  1446.     
  1447.     
  1448.     
  1449.     
  1450.     
  1451.     
  1452. -------------------------------------------------------------------------------
  1453.         
  1454.               
  1455.  
  1456.             
  1457.     VI.   MISCELLANEOUS
  1458.           
  1459.  
  1460.     A.  Math Functions and Syntax
  1461.  
  1462.         The following are legal math functions for this program:
  1463.  
  1464.         ABS()   -- absolute value
  1465.         ACOS()  -- arc cosine
  1466.         ASIN()  -- arc sine
  1467.         ATAN()  -- arc tangent
  1468.         COSH()  -- hyperbolic cosine
  1469.         COS()   -- cosine
  1470.         EXP()   -- e (= 2.7182) raised to the () power
  1471.         LOG10() -- common logarithm (base 10)
  1472.         LOG()   -- natural logarithm (base e)
  1473.         POW10() -- ten raised to the () power 
  1474.         SINH()  -- hyperbolic sine
  1475.         SIN()   -- sine
  1476.         SQRT()  -- square root
  1477.         SQR()   -- square, i.e., () raised to 2nd power
  1478.         TANH()  -- hyperbolic tangent
  1479.         TAN()   -- tangent
  1480.  
  1481.            
  1482.         The following operators are valid in functions:
  1483.         
  1484.             +    Addition                -   Subtraction    
  1485.         *    Multiplication            /   Division    
  1486.         ^    To the Power, e.g., 5^3 = 125    ()  Parenthesis
  1487.  
  1488.  
  1489.         These  functions  and  operators may be used in either the F-2D 
  1490.         and  G-3D  expressions,  to  represent  mathematical  formulae, 
  1491.         with results calculated in double-precision.
  1492.         
  1493.         Functions must be entered using  proper  algebraic  syntax,  or 
  1494.         ZGRAFWIN's  function  parser  will  indicate  an error ("Syntax 
  1495.         Error" will be  displayed).   An  example  of  some  legal  and 
  1496.         illegal ZGRAFWIN functions now follows:
  1497.  
  1498.                   
  1499.     Sample F-2D functions/expressions:
  1500.   
  1501.     1.  5.0                              <- OK  (graph = constant)
  1502.     2.  sin(x)                             <- OK  (trigonometric)
  1503.     3.  tan(x) / x + 2.6                      <- OK  (trig., x non-zero)
  1504.     4.  17.0 + x*(-3.0 + x*(-1.0 + 2.0*(x)))  <- OK  (polynomial)
  1505.     5.  3*x + 2*y - 15.0              <- OK  (line) 
  1506.     6.  x*x + y*y - 25.0              <- OK  (circle)
  1507.     7.  sin(P)/cos(x)                         <- Illegal (the symbol 
  1508.                                       'P' is not defined)
  1509.     8.  sin(2.0 * x + (3.0 * x)               <- Illegal (Parenthesis 
  1510.                                       imbalance)
  1511.     9.  3.0 * x + 5.0 = 8.0                      <- Illegal ('=' symbol 
  1512.                                       not allowed)
  1513.  
  1514.         
  1515.         
  1516.         
  1517.         
  1518. -------------------------------------------------------------------------------        
  1519.         
  1520.         
  1521.         
  1522.                   
  1523.     Sample G-3D functions:    
  1524.     
  1525.     1.  3.0                  <- OK  (plane) 
  1526.     2.  X - 5.0              <- OK  (plane) 
  1527.     3.  sin(X * Y * 0.05)          <- OK  (curved surface)     
  1528.     4.  sqrt( X/Y )              <- OK  (curved surface, 
  1529.                               Y non-zero, | X/Y | > 0)
  1530.     5.  Z = exp(X) * sin(Y)              <- Illegal ('=' and 'Z' are not
  1531.                          allowed)    
  1532.  
  1533.         
  1534.       Notes:   If you enter an EXTREMELY complicated expression, you'll get  
  1535.            a parser stack error, but for  most  practical  expressions/
  1536.            functions there  is  no need to worry about even approaching 
  1537.            this stack limit...
  1538.             
  1539.            A "Math  Calculation  Error"  may  result,  usually  due  to 
  1540.            evaluation  of a function at a singularity or at a value not 
  1541.            in the function domain, [e.g., evaluating F(X) = log(X) at X 
  1542.            = 0].  To fix the problem, change the  interval  over  which 
  1543.            the  function  is  to be graphed, so that discontinuities or 
  1544.            illegal domain values are avoided...  
  1545.            
  1546.            In  some  instances,  it may be possible to graph a function 
  1547.            over a range which does include singularities--for  example, 
  1548.            it  is  possible  to  graph F(X) = 1.0/X from -10.0 to 10.0, 
  1549.            using n = 100 data points (even though the  function  "blows 
  1550.            up"  at  X = 0).  In this instance we are fortunate, because 
  1551.            don't have to evaluate  the  function  PRECISELY  at  X = 0. 
  1552.            You'll note that the trace around X = 0 isn't very accurate! 
  1553.            
  1554.         
  1555.     B.  Saving/Restoring Graphics Images
  1556.     
  1557.         ZGRAFWIN supports the standard PCX graphics format.  Images may 
  1558.         be imported into ZGRAFWIN ("Load PCX  File"  on  the  "Options" 
  1559.         menu) and/or saved to a file ("Save PCX File").
  1560.         
  1561.         Monochrome, 16-color, and 256-color PCX images may be  imported 
  1562.         into  ZGRAFWIN.   Using the scroll bars, images can be scrolled 
  1563.         up/ down and right/left as necessary to  view  even  large  PCX 
  1564.         images...   ZGRAFWIN  allows  graphics  images  to  be saved in 
  1565.         the 16-color PCX format.   
  1566.            
  1567.         In addition, there is an option allowing the user to  copy  the 
  1568.         graphics  screen  to  the Windows Clipboard, for use with other 
  1569.         graphics software, e.g., the Windows Paintbrush  program.  This
  1570.         feature is also on the "Options" menu.
  1571.         
  1572.         
  1573.         
  1574.         
  1575.         
  1576.            
  1577.                
  1578.         
  1579.         
  1580.         
  1581.         
  1582.         
  1583.         
  1584. -------------------------------------------------------------------------------
  1585.         
  1586.         
  1587.         
  1588.                
  1589.         
  1590.     C.  Data-File Input Formats
  1591.     
  1592.     
  1593.             Numeric-Data Formats:
  1594.             --------------------
  1595.         
  1596.         ZGRAFWIN expects numeric data in a specified format for each of  
  1597.         the different  graph  categories.   Input data must  be  in the 
  1598.         following format:
  1599.     
  1600.     
  1601.         1.  F-2D         -- N/A
  1602.  
  1603.                     
  1604.         2.  G-3D       -- N/A
  1605.         
  1606.                 
  1607.         3.  X/Y Line, Log, Area:
  1608.  
  1609.             Each  row  in  the  file  should  have  3  entries,  an 
  1610.             x-coordinate, a y-coordinate, and a  symbol,  separated  
  1611.             by whitespace.  That is, each line should look like:
  1612.             
  1613.             [x]    [y]     [symbol]
  1614.                 
  1615.             Here,  the  [x]- and [y]-coordinates are floating-point 
  1616.             numbers; [symbol] is an ASCII character.
  1617.                 
  1618.  
  1619.         4.  Polar:
  1620.             
  1621.             Each  row  in  the  file  should  have  3   entries--an 
  1622.             x-coordinate,  a  y-coordinate, and  a  symbol;  alter- 
  1623.             natively, a radius, an angle, and a symbol may be used:
  1624.             
  1625.             [x]    [y]     [symbol]        
  1626.                 
  1627.                 - OR -
  1628.     
  1629.             [r]     [theta]     [symbol]   
  1630.             
  1631.             The [x]-, [y]-, [r]- and [theta]-values are all  float- 
  1632.             point  numbers;  [theta] is in radians, and [symbol] is 
  1633.             an ASCII character.
  1634.                       
  1635.                                           
  1636.         5.  Pie:
  1637.             
  1638.             Each row in the data file should contain the size of an 
  1639.             individual sector in the pie (a floating-point number).  
  1640.             For  [n]  slices  in  the pie, there should be [n] data 
  1641.             lines in the data file, each of the form:
  1642.             
  1643.             [Slice size]
  1644.         
  1645.             where [Slice size] is a floating-pt. number.
  1646.              
  1647.         
  1648.         
  1649.         
  1650. -------------------------------------------------------------------------------
  1651.         
  1652.         
  1653.                     
  1654.            
  1655.         6.  Bar:        
  1656.             
  1657.             The format of the data file depends upon the number  of 
  1658.             bar groups in the graph, as follows (assuming there are
  1659.             [n] data samples):
  1660.         
  1661.             
  1662.             For 1 Group of Bars:    [Sample 1]
  1663.                                [Sample 2]   
  1664.                         [Sample 3]
  1665.                         .
  1666.                         .            
  1667.                         .    
  1668.                         [Sample n]   
  1669.     
  1670.         
  1671.             
  1672.             For 2 Groups:   [Samp. 1, Group 1]   [Samp. 1, Group 2]
  1673.                     [Samp. 2, Group 1]   [Samp. 2, Group 2] 
  1674.                     [Samp. 3, Group 1]   [Samp. 3, Group 2]
  1675.                        .             .
  1676.                        .             .
  1677.                         .             .
  1678.                     [Samp. n, Group 1]   [Samp. n, Group 2]
  1679.             
  1680.         
  1681.             
  1682.             3 Groups:   [Samp 1/Gr 1]  [Samp 1/Gr 2]  [Samp 1/Gr 3]
  1683.                     [Samp 2/Gr 1]  [Samp 2/Gr 2]  [Samp 2/Gr 3]
  1684.                     [Samp 3/Gr 1]  [Samp 3/Gr 2]  [Samp 3/Gr 3]
  1685.                    .         .        .
  1686.                    .         .        .
  1687.                    .         .        .
  1688.                     [Samp n/Gr 1]  [Samp n/Gr 2]  [Samp n/Gr 3]
  1689.             
  1690.  
  1691.  
  1692.             Note that there are as many rows in the file  as  there 
  1693.             are  bar  samples,  and  as many entries on each row as 
  1694.             there are bar groups (1-3).  
  1695.  
  1696.  
  1697.         
  1698.         
  1699.         Command-Line Syntax:
  1700.         -------------------
  1701.         
  1702.         The general syntax of a ZGRAFWIN data-file command line  (i.e.,  
  1703.         a line which begins with "#") is:
  1704.     
  1705.         #[COMMAND id]  =  [EXPRESSION]     ,
  1706.  
  1707.         where command identifiers and  expression  values represent the
  1708.         legal identifiers and expressions for the different graphs,  as 
  1709.         listed in the following chart:
  1710.         
  1711.         
  1712.         
  1713.         
  1714.         
  1715.         
  1716. -------------------------------------------------------------------------------
  1717.         
  1718.         
  1719.                 
  1720.                      GRAPH
  1721.         [COMMAND id]      APPLICABILITY     LEGAL [EXPRESSION] values
  1722.         -------------------------------------------------------------
  1723.         
  1724.         #GRAPH_TYPE              All              [See Item #1 Below]    
  1725.         #AXIS_COLOR       XY/Polar/Log      A Number, 0-15  
  1726.         #BKG_COLOR            All           A Number, 0-15
  1727.         #DRAW_COLOR          Bar/Pie/Area      A Number, 0-15
  1728.         #PIE_COLOR               Pie            A Number, 0-15
  1729.         #FILL_COLORS    XY/Log/Bar/Pie/Area    [See Item #2 Below]
  1730.         #FILL_PATTERNS    ------- Not Yet Implemented -----------
  1731.         #MAIN_TITLE              All           A String terminated by "^"
  1732.         #HORIZ_TITLE    XY/Log/Polar/Area   A String terminated by "^"
  1733.         #VERT_TITLE     XY/Log/Polar/Area   A String terminated by "^"
  1734.         #LEGEND_TITLES      Bar           One or More Strings,
  1735.                            Each Delimited by "^"
  1736.         #ITEM_TITLES    Bar/Pie     A String terminated by "^"
  1737.         #DATA          All             [None Needed]
  1738.         #NUMBER_OF_SAMPLES    Bar            A Number, 1 - ?
  1739.         #NUMBER_OF_GROUPS     Bar            A Number, 1-3
  1740.         #XMIN          XY        A Floating-Pt. Number
  1741.         #XMAX          XY        A Floating-Pt. Number
  1742.         #YMIN        XY / Bar    A Floating-Pt. Number
  1743.         #YMAX        XY / Bar    A Floating-Pt. Number
  1744.         #OPTIONS              All               [See Item #4 Below]
  1745.         
  1746.  
  1747.                         
  1748.         1.  The #GRAPH_TYPE Command must appear in the  data  file, 
  1749.             and  should  be  followed by one of the following graph 
  1750.             identifiers: 
  1751.             
  1752.             XY_GRAPH
  1753.             POLAR_GRAPH
  1754.             LOG_GRAPH
  1755.             BAR_GRAPH
  1756.             PIE_GRAPH
  1757.             AREA_GRAPH
  1758.             
  1759.                 
  1760.         2.  The  #FILL_COLORS  Command  should  be  followed by  an 
  1761.             expression  listing  the  appropriate  number  of  fill 
  1762.             colors  for the graph, each separated by a carat ("^").  
  1763.             Each Fill Color should be in the range 0-15, where:  
  1764.  
  1765.                    Black   = 0        Gray           =  8
  1766.                 Blue    = 1        Bright Blue    =  9
  1767.                Green   = 2        Bright Green   = 10
  1768.                Cyan    = 3        Bright Cyan    = 11
  1769.                Red     = 4        Bright Red     = 12
  1770.                    Yellow  = 5        Bright Yellow  = 13
  1771.                    Brown   = 6        Bright Brown   = 14
  1772.                    White   = 7        Bright White   = 15
  1773.             
  1774.             For  example,  the  following  command-line  specifies
  1775.             three fill colors as Blue (0), Green (2), and Cyan (3). 
  1776.             
  1777.         
  1778.             #FILL_COLORS = 1 ^ 2 ^ 3 ^    
  1779.             
  1780.  
  1781.                     
  1782. -------------------------------------------------------------------------------
  1783.  
  1784.             
  1785.             
  1786.                         
  1787.             For a bar graph, each fill  color  corresponds  to  the 
  1788.             color  of  an  individual  bar group.  For pie and area 
  1789.             graphs, each fill color corresponds  to  an  individual 
  1790.             pie  slice  or area region in the graph.  For an XY- or 
  1791.             Log-style graph, the first data group  is  drawn  using 
  1792.             the  plot_color,  but  (for  multiple  data groups) the 
  1793.             individual data groups after the first are drawn  using 
  1794.             the fill-colors.  For  example,  for a log graph with 5 
  1795.             groups of data, data group #1 would be drawn  with  the 
  1796.             plot color, and groups #2 - #5 would be drawn using the 
  1797.             second thru fifth fill-colors, respectively.
  1798.  
  1799.         
  1800.         3.  The  #OPTIONS  command should be followed by a list  of 
  1801.             appropriate  options  switches,  each   of   which   is 
  1802.             separated  by  a  carat  ("^").  Legal Options Switches 
  1803.             are:
  1804.     
  1805.              CONNECT       - Forces Line Connect Display ON    
  1806.              NO_CONNECT    - Forces Line Connect Display OFF
  1807.     
  1808.             
  1809.              SYMBOLS       - Forces Symbol Display ON
  1810.              NO_SYMBOLS    - Forces Symbol Display OFF
  1811.     
  1812.             
  1813.     for Polar   ->   POLAR           - Specifies POLAR input data format
  1814.     Graphs Only ->   RECTANGULAR   - Specifies RECTANGULAR input format
  1815.         
  1816.         
  1817.         
  1818.              GRID           - Forces Grid Display ON
  1819.              NO_GRID       - Forces Grid Display OFF
  1820.  
  1821.                 
  1822.     for Log     ->   LOG_X           - Specifies a Log X, Linear Y Graph
  1823.     Graphs        ->      LOG_Y           - Specifies a Log Y, Linear X Graph
  1824.     Only        ->      LOG_LOG       - Specifies a Log X, Log Y Graph
  1825.     
  1826.     
  1827.     for Pie and ->   2D           - Specifies a 2-Dimensional Graph
  1828.     Bar Graphs  ->   3D           - Specifies a 3-Dimensional Graph
  1829.     Only
  1830.         
  1831.         
  1832.     for X/Y and ->     MANUAL           - Manual Scaling (user enters the X-
  1833.     Bar Graphs                   and/or the Y- axis ranges)
  1834.         Only        ->     AUTOMATIC     - Automatic Scaling (default)
  1835.             
  1836.             
  1837.                     
  1838.     Example:   For a Polar Graph, the Following  #OPTIONS  Line  Forces 
  1839.            the Input Data to POLAR  format, turns  the Line-Connect 
  1840.            feature ON, and turns the Grid Display feature ON:
  1841.     
  1842.            #OPTIONS = POLAR ^ CONNECT ^ GRID ^
  1843.             
  1844.             
  1845.             
  1846.  
  1847.             
  1848. -------------------------------------------------------------------------------
  1849.             
  1850.                             
  1851.     
  1852.     Note that all commands and expressions  are  upper-case.   Since  a 
  1853.     "minimal" token-parsing  technique  is used,  shortened versions or 
  1854.     alternate versions  of  both  the  [COMMAND  id]  and  [EXPRESSION] 
  1855.     identifiers  may  be  utilized  in  many  cases.   For example, the 
  1856.     following command lines are all equivalent:
  1857.     
  1858.     
  1859.         #GRAPH_TYPE = BAR_GRAPH
  1860.         #GRAPH TYPE = BAR GRAPH
  1861.         #GRAPH        = BAR GRAPH
  1862.         #GRAPH        = BAR
  1863.  
  1864.            
  1865.     An  invalid  command  line  will  be rejected by the parser, and an 
  1866.     error message will displayed, showing the invalid  token  and  line 
  1867.     number in the file...
  1868.  
  1869.     
  1870.     
  1871.     D.  ZGRAFWIN Editor
  1872.     
  1873.     ZGRAFWIN has a built-in editor, to assist in  viewing  and  editing 
  1874.     small-to-medium-size ASCII files (less than 20K bytes).  The editor 
  1875.     is   under   the   "Options"   menu.   The  selections  are  fairly 
  1876.     straightforward, and parallel those used in other Windows programs; 
  1877.     thus, only a brief  command  summary  will  be  given.   The  basic 
  1878.     options are:
  1879.     
  1880.         New  -- Clears the Edit Workspace.
  1881.         Open -- Opens A New File For Editing in the Workspace
  1882.         Save -- Saves A File from the Workspace to Disk
  1883.          Save As -- Saves A File, Prompting for User-entered File Name
  1884.      Exit Editor -- Leaves Editor and Returns to Main ZGRAFWIN Program
  1885.     
  1886.     The editor's range of "word-processing" features is fairly limited, 
  1887.     but there are basic options to cut,  copy, and  paste  to/from  the 
  1888.     clipboard, etc., as in other Windows file-processing applications.
  1889.  
  1890.  
  1891.         
  1892.     E.  Adding Custom Text to Graphs
  1893.     
  1894.     ZGRAFWIN  has  a  feature which makes it possible to add customized 
  1895.     text, labels, etc. to a graph.  Up to 30 separate strings,  each up 
  1896.     to  80  characters  in  length  may be located anywhere on a graph, 
  1897.     displayed in your choice of color and text styles...
  1898.         
  1899.     Custom text is added to a graph  using  the  "Text"  menu  options.  
  1900.     Before  entering  the  text, the foreground and background color of 
  1901.     the text as well as any text style options  (including  text  font, 
  1902.     text size settings, etc.) should be selected.
  1903.     
  1904.     Once text attributes are established, select "Enter text string" to 
  1905.     enter the actual text you wish to add to the graph.   After  typing 
  1906.     in  the text, ZGRAFWIN will direct you to position the mouse cursor 
  1907.     at the location onscreen where the text is to be placed.  When  you 
  1908.     click  the  mouse  button,  the text is shown in the window, and is 
  1909.     locked in position.  Now whenever  you  regenerate  a  graph  (with 
  1910.     "Generate  [graph  type])", these custom text strings will be added 
  1911.     
  1912.     
  1913.     
  1914. -------------------------------------------------------------------------------    
  1915.  
  1916.     
  1917.     
  1918.     onto the  screen  at  their  appropriate  positions.   Custom  text 
  1919.     strings  will  also  be printed (superimposed on the graph), if you 
  1920.     print a graph...
  1921.                       
  1922.     If  you  make  a  mistake, you can successively delete ("undo") the 
  1923.     most recently entered text strings  one-by-one,  using "Delete last 
  1924.     string", or clear all text strings entered from the window at  once 
  1925.     with  "Delete  All  text".   Note:  the  process of deleting a text 
  1926.     string  "invalidates"  the  data  in  the  window--the  display  is 
  1927.     cleared.   Just  "regenerate"  your  graph  again,  to  see the new 
  1928.     changes reflected on the screen...
  1929.            
  1930.  
  1931.     Note:  If you choose to print a graph with text-strings, it is best 
  1932.            to  use  a screen-print mode (see section V, "Printing"), to 
  1933.            ensure  that  the  strings  are  printed  in   the   correct 
  1934.            locations.   If  the  Direct-GDI  mode is used to print, the 
  1935.            text strings may be located a bit erratically on the printed 
  1936.            page, because of resolution differences between  the  screen 
  1937.            and   the  printed  output.   With  some  extra  effort  and 
  1938.            trial-and-error, however, the Direct-GDI mode may be used.
  1939.         
  1940.     
  1941.   VII.  FILES INCLUDED ON DISK
  1942.     
  1943.  
  1944.     The following files are part of this package:
  1945.  
  1946.     ZGRAFWIN.EXE    - Main Windows Executable Program
  1947.     ZGRAFWIN.DOC    - User Instructions (this file)
  1948.     XY.DAT        - Sample data-file for Discrete X/Y graph
  1949.     LOG.DAT        - Sample data-file for Log graph
  1950.         AREA.DAT    - Sample data-file for Area graph
  1951.     POLAR.DAT    - Sample data-file for Polar graph
  1952.     BAR.DAT        - Sample data-file for Bar graph
  1953.     PIE.DAT        - Sample data-file for Pie graph
  1954.     WHATS.NEW    - History, Improvements to ZGRAFWIN        
  1955.         
  1956.     
  1957.                                        
  1958.   VIII.  REGISTRATION
  1959.  
  1960.     If you have any comments or  suggestions  regarding  this  program, 
  1961.     please  feel  free  to  contact me.  If you have found this program 
  1962.     useful,  a  registration  fee  of  $15  (or  an  amount  you   feel 
  1963.     appropriate)  would  be  greatly  appreciated.   You  may  use  the 
  1964.     registration/user-response form below, or one of your own.  For $10 
  1965.     more, an  attractive  spiral-bound,  illustrated  ZGRAFWIN  program 
  1966.     manual is available also...    
  1967.  
  1968.     By  registering  ZGRAFWIN  you will gain access to upcoming program 
  1969.     news and information.  Also, if  you  register  now,  you  will  be 
  1970.     entitled to two free program updates, when they become available.
  1971.     
  1972.     Even if you don't want to register, I'm  still  interested  in  any 
  1973.     comments/feedback  you  might have regarding the program--including 
  1974.     information on any  problems  you've  had  using  the  program  and 
  1975.     general  information  on how I might improve things.  Please direct 
  1976.     correspondence to:
  1977.            
  1978.            
  1979.  
  1980. -------------------------------------------------------------------------------
  1981.            
  1982.            
  1983.                       
  1984.     John Jakob, ZGRAFWIN Software
  1985.     1831 Old Hickory Court     
  1986.     New Albany, IN 47150     
  1987.  
  1988.     Phone: (812) 949-9524 (h)          
  1989.            (812) 944-3865 (w)    
  1990.  
  1991.  
  1992.     Important Notes:        
  1993.         
  1994.        1.  If  you work in a non-profit agency, charitable/humanitarian 
  1995.            organization, ministry, etc., or for some reason are  unable 
  1996.            to  afford  the  $15  registration  fee,  you  may  register 
  1997.            ZGRAFWIN for  yourself/your  organization  free  of  charge.  
  1998.            However,  please  do  write  and  let  me  know  you want to 
  1999.            register, so I can put your name and/or organization  on  my 
  2000.            mailing list.  Thanks!
  2001.     
  2002.        2.  If  you're  a  software  developer/programmer  and  would be 
  2003.            interested in utilizing/modifying ZGRAFWIN graphics for  use 
  2004.            in  your  own  (MS-Windows  3.0)  programs, you may purchase 
  2005.            source code (Borland C++)  and/or  a  Windows  Dynamic-Link-
  2006.            Library (DLL) with the graphics  functions  for a reasonable 
  2007.            price.  Contact me for details...    
  2008.     
  2009.                
  2010.  
  2011.  
  2012.     ┌--------------------------------------------------------------------┐
  2013.     |           ZGRAF/ZGRAFWIN REGISTRATION/USER RESPONSE FORM         |
  2014.     ├--------------------------------------------------------------------┤
  2015.     |                                     |
  2016.     |                                        |
  2017.     |    Name:   ____________________________________________         |
  2018.     |                                     |
  2019.     |    Address: ___________________________________________         |
  2020.     |                                     |
  2021.     |    City, State, ZIP:___________________________________         |
  2022.     |                                     |
  2023.     |    Country: ___________________________________________         |
  2024.     |                                     |
  2025.     |                                     |
  2026.     |                                     |
  2027.     |    Please Indicate  _____  ZGRAFWIN Windows Registration $15 US     |
  2028.     |    Your Choice(s):  _____  ZGRAFWIN Documentation Manual $10 US     |
  2029.     |                                     |
  2030.     |              _____  ZGRAF MS-DOS Registration     $10 US     |
  2031.     |              _____  ZGRAF Documentation Manual    $10 US     |
  2032.     |                                     |
  2033.     |                                     |
  2034.     |    To assist me in creating a better product for you, the user,      |
  2035.     |    please answer the following questions:                          |
  2036.     |                                     |
  2037.     |                                     |
  2038.     |    1.  Where did you hear of the program (please be specific)?     |
  2039.     |        ________________________________________________________     |
  2040.     |        ________________________________________________________     |
  2041.     |                                     |
  2042.     |    2.  What  was  your general impression of the program?  What     |
  2043.     |          features did you like?   What  did  you dislike, or what     |
  2044.     |        would you like to see added or improved?             |
  2045.     |        ________________________________________________________     |
  2046.     |        ________________________________________________________     |
  2047.     |        ________________________________________________________     |
  2048.     |        ________________________________________________________     |
  2049.     |        ________________________________________________________     |
  2050.     |        ________________________________________________________     |
  2051.     |                                     |
  2052.     |    3.  Would you  personally  recommend  ZGRAF or ZGRAFWIN  for     |
  2053.     |        another user?  Why or why not?                 |
  2054.     |        ________________________________________________________     |
  2055.     |        ________________________________________________________     |
  2056.     |        ________________________________________________________     |
  2057.     |                                     |
  2058.     |     4.  Any Other General Comments:                 |
  2059.     |        ________________________________________________________     |
  2060.     |        ________________________________________________________     |
  2061.     |        ________________________________________________________     |
  2062.     |        ________________________________________________________     |
  2063.     |                                     |
  2064.     |                                     |
  2065.     |        Please Complete      John Jakob, ZGRAF/ZGRAFWIN Software     |
  2066.     |        and Mail To:         1831 Old Hickory Court             |
  2067.     |                             New Albany, IN 47150             |
  2068.     |                                     |
  2069.     |                                     |
  2070.     ├--------------------------------------------------------------------┤
  2071.     |                                     |
  2072.     └--------------------------------------------------------------------┘
  2073.